from django.db import models

class BaseTable(models.Model):
    id = models.BigAutoField(primary_key=True, verbose_name='主键')
    create_time = models.DateTimeField(auto_now_add=True, verbose_name='记录创建时间')
    is_show = models.BooleanField(default=True, verbose_name='是否展示')
    is_delete = models.BooleanField(default=False, verbose_name='是否删除')
    update_time = models.DateTimeField(verbose_name='记录更新时间', auto_now_add=True)

    class Meta:
        abstract = True
        verbose_name = '基表'
        verbose_name_plural = verbose_name

    def __str__(self):
        return f"BaseTable {self.id}"